package com.objetdirect.gwt.umlapi.client.emul.impl;

 

import com.google.gwt.user.client.Element;
import com.google.gwt.user.client.ui.Widget;
import com.objetdirect.gwt.umlapi.client.emul.def.GraphicCanvas;
import com.objetdirect.gwt.umlapi.client.emul.def.GraphicObject;
import com.objetdirect.gwt.umlapi.client.emul.def.GraphicObjectListener;

public class TatamiGraphicCanvas implements GraphicCanvas {

	private com.objetdirect.tatami.client.gfx.GraphicCanvas _member = null;
	
	public TatamiGraphicCanvas()
	{
		_member = new com.objetdirect.tatami.client.gfx.GraphicCanvas();
	}
	
	public TatamiGraphicCanvas(Widget canvas)
	{
		_member = (com.objetdirect.tatami.client.gfx.GraphicCanvas)canvas;
	}
	@Override
	public Object getInnerObject() {
		return _member;
	}
	@Override
	public void addGraphicObjectListener(
			GraphicObjectListener graphicObjectListener) {
		_member.addGraphicObjectListener((com.objetdirect.tatami.client.gfx.GraphicObjectListener)graphicObjectListener.getInnerObject());
		
	}
	@Override
	public void add(GraphicObject graphicObject, int x, int y) {
		_member.add((com.objetdirect.tatami.client.gfx.GraphicObject)graphicObject.getInnerObject(), x, y);
		
	}
	@Override
	public void setDimensions(int width, int height) {
		_member.setDimensions(width, height);
	}
	@Override
	public void remove(GraphicObject graphicObject) {
		_member.remove((com.objetdirect.tatami.client.gfx.GraphicObject)graphicObject.getInnerObject());
	}
	@Override
	public void setSize(String width, String height) {
		_member.setSize(width, height);
		
	}
	@Override
	public Element getElement() {
		return _member.getElement();
	}
}
